Integrand size = 16, antiderivative size = 123 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3392, 3377, 2717, 2713} \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {2 d^2 \sin ^3(a+b x)}{27 b^3}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \sin (a+b x) \cos ^2(a+b x)}{3 b} \]
[In]
[Out]
Rule 2713
Rule 2717
Rule 3377
Rule 3392
Rubi steps \begin{align*} \text {integral}& = \frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2}{3} \int (c+d x)^2 \cos (a+b x) \, dx-\frac {\left (2 d^2\right ) \int \cos ^3(a+b x) \, dx}{9 b^2} \\ & = \frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}-\frac {(4 d) \int (c+d x) \sin (a+b x) \, dx}{3 b}+\frac {\left (2 d^2\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (a+b x)\right )}{9 b^3} \\ & = \frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}-\frac {2 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3}-\frac {\left (4 d^2\right ) \int \cos (a+b x) \, dx}{3 b^2} \\ & = \frac {4 d (c+d x) \cos (a+b x)}{3 b^2}+\frac {2 d (c+d x) \cos ^3(a+b x)}{9 b^2}-\frac {14 d^2 \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^2 \sin (a+b x)}{3 b}+\frac {(c+d x)^2 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2 d^2 \sin ^3(a+b x)}{27 b^3} \\ \end{align*}
Time = 0.63 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.76 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {162 b d (c+d x) \cos (a+b x)+6 b d (c+d x) \cos (3 (a+b x))+2 \left (-82 d^2+45 b^2 (c+d x)^2+\left (-2 d^2+9 b^2 (c+d x)^2\right ) \cos (2 (a+b x))\right ) \sin (a+b x)}{108 b^3} \]
[In]
[Out]
Time = 1.64 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.04
method | result | size |
risch | \(\frac {3 d \left (d x +c \right ) \cos \left (b x +a \right )}{2 b^{2}}+\frac {3 \left (x^{2} d^{2} b^{2}+2 b^{2} c d x +b^{2} c^{2}-2 d^{2}\right ) \sin \left (b x +a \right )}{4 b^{3}}+\frac {d \left (d x +c \right ) \cos \left (3 b x +3 a \right )}{18 b^{2}}+\frac {\left (9 x^{2} d^{2} b^{2}+18 b^{2} c d x +9 b^{2} c^{2}-2 d^{2}\right ) \sin \left (3 b x +3 a \right )}{108 b^{3}}\) | \(128\) |
parallelrisch | \(\frac {-42 d^{2} \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right ) x b +\left (54 \left (d x +c \right )^{2} b^{2}-84 d^{2}\right ) \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+108 b \left (-\frac {d x}{6}+c \right ) d \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+\left (36 \left (d x +c \right )^{2} b^{2}-152 d^{2}\right ) \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+144 b d \left (\frac {d x}{8}+c \right ) \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )+\left (54 \left (d x +c \right )^{2} b^{2}-84 d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )+84 b d \left (\frac {d x}{2}+c \right )}{27 b^{3} \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{3}}\) | \(180\) |
derivativedivides | \(\frac {\frac {a^{2} d^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b^{2}}-\frac {2 a c d \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b}-\frac {2 a \,d^{2} \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b^{2}}+\frac {c^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {2 c d \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b}+\frac {d^{2} \left (\frac {\left (b x +a \right )^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}-\frac {4 \sin \left (b x +a \right )}{3}+\frac {4 \left (b x +a \right ) \cos \left (b x +a \right )}{3}+\frac {2 \left (b x +a \right ) \left (\cos ^{3}\left (b x +a \right )\right )}{9}-\frac {2 \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{27}\right )}{b^{2}}}{b}\) | \(265\) |
default | \(\frac {\frac {a^{2} d^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b^{2}}-\frac {2 a c d \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b}-\frac {2 a \,d^{2} \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b^{2}}+\frac {c^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {2 c d \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b}+\frac {d^{2} \left (\frac {\left (b x +a \right )^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}-\frac {4 \sin \left (b x +a \right )}{3}+\frac {4 \left (b x +a \right ) \cos \left (b x +a \right )}{3}+\frac {2 \left (b x +a \right ) \left (\cos ^{3}\left (b x +a \right )\right )}{9}-\frac {2 \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{27}\right )}{b^{2}}}{b}\) | \(265\) |
norman | \(\frac {\frac {4 c d \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b^{2}}+\frac {28 c d}{9 b^{2}}+\frac {14 d^{2} x}{9 b^{2}}+\frac {4 \left (9 b^{2} c^{2}-38 d^{2}\right ) \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{27 b^{3}}+\frac {2 \left (9 b^{2} c^{2}-14 d^{2}\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{9 b^{3}}+\frac {2 \left (9 b^{2} c^{2}-14 d^{2}\right ) \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{9 b^{3}}+\frac {16 c d \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b^{2}}+\frac {2 d^{2} x^{2} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}+\frac {4 d^{2} x^{2} \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b}+\frac {2 d^{2} x^{2} \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {2 d^{2} x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b^{2}}-\frac {2 d^{2} x \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b^{2}}-\frac {14 d^{2} x \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{9 b^{2}}+\frac {4 c d x \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b}+\frac {8 c d x \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b}+\frac {4 c d x \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{3}}\) | \(337\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.04 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {6 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )^{3} + 36 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right ) + {\left (18 \, b^{2} d^{2} x^{2} + 36 \, b^{2} c d x + 18 \, b^{2} c^{2} + {\left (9 \, b^{2} d^{2} x^{2} + 18 \, b^{2} c d x + 9 \, b^{2} c^{2} - 2 \, d^{2}\right )} \cos \left (b x + a\right )^{2} - 40 \, d^{2}\right )} \sin \left (b x + a\right )}{27 \, b^{3}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 284 vs. \(2 (121) = 242\).
Time = 0.38 (sec) , antiderivative size = 284, normalized size of antiderivative = 2.31 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\begin {cases} \frac {2 c^{2} \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {c^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {4 c d x \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {2 c d x \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {2 d^{2} x^{2} \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {d^{2} x^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {4 c d \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{3 b^{2}} + \frac {14 c d \cos ^{3}{\left (a + b x \right )}}{9 b^{2}} + \frac {4 d^{2} x \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{3 b^{2}} + \frac {14 d^{2} x \cos ^{3}{\left (a + b x \right )}}{9 b^{2}} - \frac {40 d^{2} \sin ^{3}{\left (a + b x \right )}}{27 b^{3}} - \frac {14 d^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{9 b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \cos ^{3}{\left (a \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (111) = 222\).
Time = 0.25 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.17 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=-\frac {36 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} c^{2} - \frac {72 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a c d}{b} + \frac {36 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a^{2} d^{2}}{b^{2}} - \frac {6 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} c d}{b} + \frac {6 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} a d^{2}}{b^{2}} - \frac {{\left (6 \, {\left (b x + a\right )} \cos \left (3 \, b x + 3 \, a\right ) + 162 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left (9 \, {\left (b x + a\right )}^{2} - 2\right )} \sin \left (3 \, b x + 3 \, a\right ) + 81 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} d^{2}}{b^{2}}}{108 \, b} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.11 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {{\left (b d^{2} x + b c d\right )} \cos \left (3 \, b x + 3 \, a\right )}{18 \, b^{3}} + \frac {3 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )}{2 \, b^{3}} + \frac {{\left (9 \, b^{2} d^{2} x^{2} + 18 \, b^{2} c d x + 9 \, b^{2} c^{2} - 2 \, d^{2}\right )} \sin \left (3 \, b x + 3 \, a\right )}{108 \, b^{3}} + \frac {3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - 2 \, d^{2}\right )} \sin \left (b x + a\right )}{4 \, b^{3}} \]
[In]
[Out]
Time = 14.47 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.41 \[ \int (c+d x)^2 \cos ^3(a+b x) \, dx=\frac {\frac {d^2\,x\,\cos \left (3\,a+3\,b\,x\right )}{18}+\frac {3\,c\,d\,\cos \left (a+b\,x\right )}{2}+\frac {c\,d\,\cos \left (3\,a+3\,b\,x\right )}{18}+\frac {3\,d^2\,x\,\cos \left (a+b\,x\right )}{2}}{b^2}+\frac {\frac {3\,c^2\,\sin \left (a+b\,x\right )}{4}+\frac {c^2\,\sin \left (3\,a+3\,b\,x\right )}{12}+\frac {3\,d^2\,x^2\,\sin \left (a+b\,x\right )}{4}+\frac {d^2\,x^2\,\sin \left (3\,a+3\,b\,x\right )}{12}+\frac {3\,c\,d\,x\,\sin \left (a+b\,x\right )}{2}+\frac {c\,d\,x\,\sin \left (3\,a+3\,b\,x\right )}{6}}{b}-\frac {3\,d^2\,\sin \left (a+b\,x\right )}{2\,b^3}-\frac {d^2\,\sin \left (3\,a+3\,b\,x\right )}{54\,b^3} \]
[In]
[Out]